#include "mdiarea.h"

MdiArea::MdiArea(QtDAO *qtdao, QWidget *parent) {
    this->qtdao = qtdao;
    this->mdi = new QMdiArea();
    this->setWindowTitle("Work Place");
    this->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable);
}

MdiArea::~MdiArea(){

}

void MdiArea::creat_sub_window(QWidget *object){
    /*
    创建实例对应的子窗口
        :param object: 窗口实例
        :return: None
    */
    QWidget *sub = object;
    this->mdi->addSubWindow(sub);
    sub->show();
    this->setWidget(this->mdi);
}
